/*                                                              *
 * Project name : "Meteor" engine                               *
 * Version      : 1.8                                           *
 * Date         : 2000                                          *
 *                                                              *
 * Copyright    : dReddi                                        *
 */

#include <windows.h>
#include "gameai.h"
#include "globals.h"
#include "cgame.h"
#include "cplayer.h"

/*
 * DLL procedures
 */
extern "C" DLLExport void* GetClassPtr(int classtype,char *classname)
    {
    void *final=NULL;

    // Actor classes
    
    if (classtype==CLASS_ACTOR)
        {
        if (strcmp(classname,"player.male")==0)
            {
            final=new CMyPlayer;
        }
    }

    // Game classes    
    
    if (classtype==CLASS_GAME)
        {
        final=new CMyGame;
    }

    // Return pointer    
    
    return final;
}

extern "C" DLLExport void FreeClassPtr(int classtype,void *classptr)
    {
    if (classptr!=NULL)
        {
        delete classptr;
        classptr=NULL;
    }
}
